#pragma  once

namespace	MomogenkyouSystem	{

class SoundContainer
{
protected:
	WAVEFORMAT			*	m_pFormat;
	BYTE				*	m_pData;
	
	SOUNDSOURCE			*	m_pSourceVoice;
	XAUDIO2_BUFFER			m_SourceBuffer;

	bool					m_bHasLoaded;
	bool					m_bIsPlaying;
	bool					m_bRepeat;
public:
	SoundContainer();
	virtual	~SoundContainer();

	__inline	SOUNDSOURCE	*	SoundSource()						{	return	m_pSourceVoice;	}
	__inline	bool			HasLoaded()							{	return	m_bHasLoaded;	}
	__inline	bool			IsPlaying()							{	return	m_bIsPlaying;	}
	__inline	bool			IsRepeatable()						{	return	m_bRepeat;		}
	__inline	void			IsRepeatable(const bool	& bRepeat)	{	m_bRepeat = bRepeat;	}
	
	//	Loads the sound in specified filepath
	virtual		void			Load(const std::string & Filename);
	virtual		void			Unload();
};

}